import 'package:get/get.dart';

// import 'package:kong/pages/unknown/unknown_binding.dart';
import 'package:kong/pages/unknown/unknown_view.dart';
import 'package:kong/pages/splash/splash_binding.dart';
import 'package:kong/pages/splash/splash_view.dart';
import 'package:kong/pages/login/login_binding.dart';
import 'package:kong/pages/login/login_view.dart';
import 'package:kong/pages/guide/guide_binding.dart';
import 'package:kong/pages/guide/guide_view.dart';

import 'package:kong/pages/home/bindings/home_binding.dart';
import 'package:kong/pages/home/views/home_view.dart';

part 'app_routes.dart';

class AppPages {
  static const INITIAL = Routes.GUIDE;

  static final unknownRoute = GetPage(
    name: _Paths.UNKNOWN,
    page: () => UnknownView(),
    // binding: UnknownBinding(),
  );

  static final routes = [
    /*
     * 已加入unknownRoute属性，不需要添加到getPages的List中
     * 用处：当跳转到不存在的路由，会自动offAll到UNKNOWN路由
     * // unknownRoute,
     */

    GetPage(
      name: _Paths.SPLASH,
      page: () => SplashView(),
      binding: SplashBinding(),
    ),
    GetPage(
      name: _Paths.LOGIN,
      page: () => LoginView(),
      binding: LoginBinding(),
    ),
    GetPage(
      name: _Paths.GUIDE,
      page: () => GuideView(),
      binding: GuideBinding(),
    ),

    // 🌂 bottomNavigationBar 四个入口
    GetPage(
      name: _Paths.HOME,
      page: () => HomeView(),
      binding: HomeBinding(),
      children: [],
    ),
  ];
}
